import axios from './http';
import Qs from "qs"

const scene={
    addNode(params){
        return axios.get('/pict/scene/addNode/', {params});
    },
    addScript(params){
        return axios.get('/pict/scene/addScript/', {params});
    },
    getList(params){
        return axios.get('/pict/scene/getList/', {params});
    },
    readScript(params){
        return axios.get('/pict/scene/readScript/', {params});
    },
    getSceneList(params){
        return axios.get('/pict/scene/getSceneList/', {params});
    },
    getSceneData(params){
        return axios.get('/pict/scene/getSceneDetail/', {params});
    },
    deleteScene(params){
        return axios.get('/pict/scene/deleteScene/', {params})
    },
    addScene(params){
        // return axios.post('/pict/scene/addScene/', params, {'Content-Type': 'application/x-www-form-urlencoded'})
        return axios({
            url: '/pict/scene/addScene/',
            method: 'post',
            data: Qs.stringify(params),
            headers:{
                'Content-Type': 'application/x-www-form-urlencoded'
            }
        })
    },
    runPict(params){
        return axios.get('/pict/scene/actPict/', {params})
    },
    getTable(params){
        return axios.get('/pict/scene/getTable/', {params})
    },
};

export default scene;